package com.github.shiqiyue.app.api.sapi.controller.dbms.dto;

import com.github.shiqiyue.app.modules.dbms.entity.Database;
import lombok.Data;

import java.util.List;

/***
 * 数据库 列表 数据
 * @author wenyao.wu
 * @date:2019/8/9
 */
@Data
public class DatabaseListDTO {

    private List<Item> records;

    @Data
    public static class Item {

        private Long id;

        private String name;


        private Item() {
        }

        public static Item newInstance(Database database) {
            Item item = new Item();
            item.setId(database.getId());
            item.setName(database.getName());
            return item;
        }

    }
}
